-- GENERATED SPELL FOR [Blackwing Mage] --


function spell0_12420(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(22271,pUnit)
pUnit:RegisterEvent('Sorts_12420', 622, 1)
end

function spell1_12420(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(17290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12420', 3000, 1)
end

function Sorts_12420(pUnit, Event)
local choix_sorts_12420 = math.random(0, 1)
if choix_sorts_12420 == 0 then
pUnit:RegisterEvent('spell0_12420', 1, 1)
end
if choix_sorts_12420 == 1 then
pUnit:RegisterEvent('spell1_12420', 1, 1)
end
end

function mob12420_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12420', math.random(1500, 3000), 1)
end

function mob12420_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12420_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12420_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12420, 1, 'mob12420_Action')
RegisterUnitEvent(12420, 2, 'mob12420_Leave')
RegisterUnitEvent(12420, 3, 'mob12420_Kill')
RegisterUnitEvent(12420, 4, 'mob12420_Die')
